package com.wanghangcloud.common.bean.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.Set;

/**
 * token
 */
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class TokenInfo{
    /**
     * 用户ID
     */
    private String userId;

    /**
     * 用户名
     */
    private String username;

    private String name;
    private String mobile;

    /**
     * 用户类型
     */
    private String userType;

    /**
     * 部门ID
     */
    private String deptId;

    /**
     * 数据权限范围
     */
    private Integer dataScope;

    /**
     * 用户角色权限集合
     */
    private Set<String> authorities;

    private Set<String> componentCodes;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date refreshTime;
}
